* Load data
use "$data/main_touse.dta", replace

* Drop hyp high observations
drop if ctb==4

* Weights
svyset RespondiID [pweight=weights_full_sample]

* Label vars
lab var agree_cut_gh_gas  "Agree should cut greenhouse gas"
lab var agree_new_tech "Agree invest in climate tech"
lab var agree_cut_public_spend "Agree should cut public spending"
lab var agree_hum_cap "Agree should invest in human capital"
lab var agree_cut_ss "Agree should cut SS spending"
lab var agree_invest_ss "Agree should invest in equities for SS"
lab var agree_paid_mleave "Agree firms should give maternity leave"
lab var agree_report_wages "Agree firms should report wages"
lab var agree_sanctions_terror "Agree should use sanctions against terror"
lab var agree_interventions_terror "Agree should use sanctions against terror"
lab var agree_increase_ui "Agree should increase UI"
lab var agree_ubi "Agree should implement UBI"


**** POLICY VIEWS REGRESSIONS REGRESSED ON TRIMMED CTB: Policy views thresholded at median (7)
tab agree_cut_gh_gas_dummy
* Regression of policyviews on trimmed patience CTB, patience staircase, patience stated
xi: regress agree_new_tech_dummy
outreg2 using "$output/Table3.xls", ctitle(empty) excel bdec(3) sdec(3) stats(coef se) replace
outreg2 using "$output/TableA4.xls", ctitle(empty) excel bdec(3) sdec(3) stats(coef se) replace
outreg2 using "$output/TableA5.xls", ctitle(empty) excel bdec(3) sdec(3) stats(coef se) replace
outreg2 using "$output/TableA6.xls", ctitle(empty) excel bdec(3) sdec(3) stats(coef se) replace
outreg2 using "$output/TableA10.xls", ctitle(empty) excel bdec(3) sdec(3) stats(coef se) replace
outreg2 using "$output/TableA11.xls", ctitle(empty) excel bdec(3) sdec(3) stats(coef se) replace

*foreach dv in agree_cut_gh_gas_dummy agree_new_tech_dummy agree_cut_public_spend_dummy agree_hum_cap_dummy agree_cut_ss_dummy agree_invest_ss_dummy agree_paid_mleave_dummy agree_report_wages_dummy agree_sanctions_terror_dummy agree_interventions_terror_dummy agree_increase_ui_dummy agree_ubi_dummy {
foreach dv in agree_cut_gh_gas_dummy agree_new_tech_dummy agree_hum_cap_dummy agree_cut_public_spend_dummy agree_paid_mleave_dummy {
*agree_cut_public_spend_dummy agree_hum_cap_dummy {

* Patience CTB

xi: regress `dv' patience_ctb_trim riskacceptance_ctb_trim ///
age3549 age5064 age65above ///
hs some_college ba_or_more ///
i.inc_group ///
female white ///
, robust
outreg2 using "$output/Table3.xls", ctitle(`dv') excel bdec(3) sdec(3) stats(coef se) append

xi: regress `dv' patience_ctb_trim riskacceptance_ctb_trim ///
age3549 age5064 age65above ///
hs some_college ba_or_more ///
i.inc_group ///
female white ///
republican independent ///
, robust
outreg2 using "$output/TableA4.xls", ctitle(`dv') excel bdec(3) sdec(3) stats(coef se) append

svy: regress `dv' patience_ctb_trim riskacceptance_ctb_trim ///
age3549 age5064 age65above ///
hs some_college ba_or_more ///
i.inc_group ///
female white 
outreg2 using "$output/TableA5.xls", ctitle(`dv') excel bdec(3) sdec(3) stats(coef se) append

xi: regress `dv' patience_ctb_trim riskacceptance_ctb_trim ///
age3549 age5064 age65above ///
hs some_college ba_or_more ///
i.inc_group ///
female white ///
if republican==1, robust
outreg2 using "$output/TableA10.xls", ctitle(`dv') excel bdec(3) sdec(3) stats(coef se) append

xi: regress `dv' patience_ctb_trim riskacceptance_ctb_trim ///
hs some_college ba_or_more ///
i.inc_group ///
female white ///
republican independent ///
if age1834==1, robust
outreg2 using "$output/TableA11.xls", ctitle(`dv') excel bdec(3) sdec(3) stats(coef se) append

xi: regress `dv' patience_ctb_trim riskacceptance_ctb_trim ///
hs some_college ba_or_more ///
i.inc_group ///
female white ///
republican independent ///
if age3549==1, robust
outreg2 using "$output/TableA11.xls", ctitle(`dv') excel bdec(3) sdec(3) stats(coef se) append

xi: regress `dv' patience_ctb_trim riskacceptance_ctb_trim ///
hs some_college ba_or_more ///
i.inc_group ///
female white ///
republican independent ///
if age5064==1, robust
outreg2 using "$output/TableA11.xls", ctitle(`dv') excel bdec(3) sdec(3) stats(coef se) append

xi: regress `dv' patience_ctb_trim riskacceptance_ctb_trim ///
hs some_college ba_or_more ///
i.inc_group ///
female white ///
republican independent ///
if age65above==1, robust
outreg2 using "$output/TableA11.xls", ctitle(`dv') excel bdec(3) sdec(3) stats(coef se) append

xi: regress `dv' patience_ctb_trim riskacceptance_ctb_trim ///
age3549 age5064 age65above ///
hs some_college ba_or_more ///
i.inc_group ///
female white ///
if democrat==1, robust
outreg2 using "$output/TableA10.xls", ctitle(`dv') excel bdec(3) sdec(3) stats(coef se) append

svy: regress `dv' patience_ctb_trim riskacceptance_ctb_trim ///
age3549 age5064 age65above ///
hs some_college ba_or_more ///
i.inc_group ///
female white ///
republican independent
outreg2 using "$output/TableA6.xls", ctitle(`dv') excel bdec(3) sdec(3) stats(coef se) append

* Patience CTB: High
xi: regress `dv' patience_ctb_trim_high riskacceptance_ctb_trim ///
age3549 age5064 age65above ///
hs some_college ba_or_more ///
i.inc_group ///
female white ///
, robust
outreg2 using "$output/Table3.xls", ctitle(`dv') excel bdec(3) sdec(3) stats(coef se) append

xi: regress `dv' patience_ctb_trim_high riskacceptance_ctb_trim ///
age3549 age5064 age65above ///
hs some_college ba_or_more ///
i.inc_group ///
female white ///
republican independent ///
, robust
outreg2 using "$output/TableA4.xls", ctitle(`dv') excel bdec(3) sdec(3) stats(coef se) append

svy: regress `dv' patience_ctb_trim_high riskacceptance_ctb_trim ///
age3549 age5064 age65above ///
hs some_college ba_or_more ///
i.inc_group ///
female white 
outreg2 using "$output/TableA5.xls", ctitle(`dv') excel bdec(3) sdec(3) stats(coef se) append

svy: regress `dv' patience_ctb_trim_high riskacceptance_ctb_trim ///
age3549 age5064 age65above ///
hs some_college ba_or_more ///
i.inc_group ///
female white ///
republican independent 
outreg2 using "$output/TableA6.xls", ctitle(`dv') excel bdec(3) sdec(3) stats(coef se) append


* Stated Patience
xi: regress `dv' patience_self riskacceptance_self ///
age3549 age5064 age65above ///
hs some_college ba_or_more ///
i.inc_group ///
female white ///
, robust
outreg2 using "$output/Table3.xls", ctitle(`dv') excel bdec(3) sdec(3) stats(coef se) append

xi: regress `dv' patience_self riskacceptance_self ///
age3549 age5064 age65above ///
hs some_college ba_or_more ///
i.inc_group ///
female white ///
republican independent ///
, robust
outreg2 using "$output/TableA4.xls", ctitle(`dv') excel bdec(3) sdec(3) stats(coef se) append

svy: regress `dv' patience_self riskacceptance_self ///
age3549 age5064 age65above ///
hs some_college ba_or_more ///
i.inc_group ///
female white
outreg2 using "$output/TableA5.xls", ctitle(`dv') excel bdec(3) sdec(3) stats(coef se) append



svy: regress `dv' patience_self riskacceptance_self ///
age3549 age5064 age65above ///
hs some_college ba_or_more ///
i.inc_group ///
female white ///
republican independent 
outreg2 using "$output/TableA6.xls", ctitle(`dv') excel bdec(3) sdec(3) stats(coef se) append

* Stated Patience: High
xi: regress `dv' patience_self_high riskacceptance_self ///
age3549 age5064 age65above ///
hs some_college ba_or_more ///
i.inc_group ///
female white ///
, robust
outreg2 using "$output/Table3.xls", ctitle(`dv') excel bdec(3) sdec(3) stats(coef se) append

xi: regress `dv' patience_self_high riskacceptance_self ///
age3549 age5064 age65above ///
hs some_college ba_or_more ///
i.inc_group ///
female white ///
republican independent ///
, robust
outreg2 using "$output/TableA4.xls", ctitle(`dv') excel bdec(3) sdec(3) stats(coef se) append

svy: regress `dv' patience_self_high riskacceptance_self ///
age3549 age5064 age65above ///
hs some_college ba_or_more ///
i.inc_group ///
female white
outreg2 using "$output/TableA5.xls", ctitle(`dv') excel bdec(3) sdec(3) stats(coef se) append


svy: regress `dv' patience_self_high riskacceptance_self ///
age3549 age5064 age65above ///
hs some_college ba_or_more ///
i.inc_group ///
female white ///
republican independent
outreg2 using "$output/TableA6.xls", ctitle(`dv') excel bdec(3) sdec(3) stats(coef se) append
}

**** POLICY VIEWS REGRESSIONS: Different threshold (6)
* Regression of policyviews on patience CTB, patience staircase, patience stated
xi: regress agree_new_tech_d6
outreg2 using "$output/TableA7.xls", ctitle(empty) excel bdec(3) sdec(3) stats(coef se) replace


*foreach dv in agree_cut_gh_gas_d6 agree_new_tech_d6 agree_cut_public_spend_d6 agree_hum_cap_d6 agree_cut_ss_d6 agree_invest_ss_d6 agree_paid_mleave_d6 agree_report_wages_d6 agree_sanctions_terror_d6 agree_interventions_terror_d6 agree_increase_ui_d6 agree_ubi_d6 {
foreach dv in agree_cut_gh_gas_d6 agree_new_tech_d6 agree_hum_cap_d6 agree_cut_public_spend_d6 agree_paid_mleave_d6 {
*agree_cut_public_spend_d6 agree_hum_cap_d6 {

xi: regress `dv' patience_ctb_trim riskacceptance_ctb_trim ///
age3549 age5064 age65above ///
hs some_college ba_or_more ///
i.inc_group ///
female white ///
, robust
outreg2 using "$output/TableA7.xls", ctitle(`dv') excel bdec(3) sdec(3) stats(coef se) append


xi: regress `dv' patience_ctb_trim_high riskacceptance_ctb_trim ///
age3549 age5064 age65above ///
hs some_college ba_or_more ///
i.inc_group ///
female white ///
, robust
outreg2 using "$output/TableA7.xls", ctitle(`dv') excel bdec(3) sdec(3) stats(coef se) append

**** STATED

xi: regress `dv' patience_self riskacceptance_self ///
age3549 age5064 age65above ///
hs some_college ba_or_more ///
i.inc_group ///
female white ///
, robust
outreg2 using "$output/TableA7.xls", ctitle(`dv') excel bdec(3) sdec(3) stats(coef se) append

xi: regress `dv' patience_self_high riskacceptance_self ///
age3549 age5064 age65above ///
hs some_college ba_or_more ///
i.inc_group ///
female white ///
, robust
outreg2 using "$output/TableA7.xls", ctitle(`dv') excel bdec(3) sdec(3) stats(coef se) append
}
